<template>
  <div class="item">
    <el-row :span="2">
      <el-col :span="4" style="font-size: 17px;">{{item.nickName}}说：</el-col>
      <el-col :span="17" style="padding-top: 25px; font-size: 13px;">{{item.msg}}</el-col>
      <el-col :span="3"><el-button size="mini" @click="dele">删除</el-button></el-col>
    </el-row>
  </div>
</template>

<script>
    export default {
      props: {  //指定属性名及属性类型
        item: Object,
        index: Number,
        deleMsg: Function
      },
      methods: {
        dele () {
          const {index, deleMsg} = this;
          deleMsg(index);
        }
      }
    }
</script>

<style>
  .item{
    border-style:solid;
    border-color:#CCCCCC;
    border-width: 1px;
    border-radius: 3px;
    width: 100%;
    padding: 10px;
  }
</style>
